package org.thunms.framework.utils;

import java.util.Calendar;

public class UtilCalendar {
	
	public static  StringBuilder getWelcome(){
		
		StringBuilder welcome=new StringBuilder();
		Calendar now=Calendar.getInstance();
		LunarCalendar calendar= new LunarCalendar(now.getTime());
		int hour=now.get(Calendar.HOUR_OF_DAY);
		if(hour>=6&&hour<12){
			welcome.append(" 早上好！");
		}else if(hour>=12&&hour<15){
			welcome.append(" 中午好！");
		}else if(hour>=15&&hour<21){
			welcome.append(" 下午好！");
		}else{
			welcome.append(" 晚上好！");
		}
		welcome.append(" 今天是").append(UtilDate.format(now.getTime(),"yyyy年MM月dd日")).append(" ").append(calendar.getChaneseDayOfWeek()).append(" 农历 ").append(calendar.getLunarDateString()).append(" ").append(calendar.getLFestivalName());
		
		return welcome;
	}

}
